# Maintainer: Jordan Christiansen <xordspar0@gmail.com>
pkgname=tree-sitter-pascal
pkgver=0.9.1
pkgrel=0
pkgdesc="tree-sitter grammar for Pascal, Free Pascal, and Delphi"
url="https://github.com/Isopod/tree-sitter-pascal"
arch="all"
license="MIT"
makedepends="tree-sitter-dev"
checkdepends="tree-sitter-cli"
subpackages="$pkgname-doc"
install_if="tree-sitter-grammars"
source="https://github.com/Isopod/tree-sitter-pascal/archive/refs/tags/v$pkgver/tree-sitter-pascal-v$pkgver.tar.gz"

build() {
	abuild-tree-sitter build
}

check() {
	tree-sitter test
}

package() {
	DESTDIR="$pkgdir" abuild-tree-sitter install

	install -Dm644 LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
}

sha512sums="
296175d3d8fca63d5d0adafb257b64d4cc4e62e9e26dfc9de692285c29aeba66cdeb09859d0186255eb9df4e4a329b6d27f2e17f2245bd2b643c09a9f6cfca10  tree-sitter-pascal-v0.9.1.tar.gz
"
